package demo1;

import com.sun.org.apache.xerces.internal.impl.xpath.XPath;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ASUS
 * Date: 2023-11-15
 * Time: 16:48
 */
class Student{
    private String name;
    private int id;
    private int grade;

    public void Student(){
        this.name = name;
        this.id = id;
        this.grade = grade;
        System.out.println("不带参数的构造方法");
    }
    public void Studeng(String name, int id, int grade) {
        this.name = "zhagnsan";
        this.id = 1;
        this.grade = 92;
        System.out.println("带三个参数的构造方法");
    }
    public void print(){
        System.out.println(this.id+"号"+this.name+" 的成绩为："+this.grade);
    }
    public String getName(){
        return name;
    }
    public void setName(String name){
        this.name = name;
    }
}

public class Test1 {
    public static void main(String[] args) {
        Student student1 = new Student();
        Student student2 = new Student();


        student1.print();
        student2.print();
    }
}
